{template header.html}

<div class="subnav">
	<div class="content-menu ib-a blue line-x">
		{$menu}<span>|</span><a href="{SYS_HELP_URL}7.html" target="_blank"><em>{lang('help')}</em></a>
	</div>
    <div class="bk10"></div>
    <div class="table-list">
        <form action="" method="post" id="myform" name="myform">
        <table width="100%" class="table_form">
            <tr>
                <th width="100"> </th>
                <td>
                    <input name="id" type="radio" {if !$id}checked{/if} value="0" />&nbsp;&nbsp;<lable>{lang('html-244')}</lable>&nbsp;&nbsp;&nbsp;&nbsp;
                    {loop $SITE $i $t}
                    <input name="id" type="radio" {if $id && $i == $id}checked{/if} value="{$i}" />&nbsp;&nbsp;<lable>{$t.SITE_NAME}</lable>&nbsp;&nbsp;&nbsp;&nbsp;
                    {/loop}
                </td>
            </tr>
            <tr>
                <th> </th>
                <td><textarea class="input-text" name="sql" style="width:500px;height:120px">{$sql}</textarea>
                </td>
            </tr>
            <tr>
                <th> </th>
                <td><input value="{lang('379')}" type="submit" name="submit" class="button" />
                </td>
            </tr>
            {if IS_POST}
            <tr>
                <th> </th>
                <td>
                {dr_lang('html-803', $mcount)}
                </td>
            </tr>
            {if $result}
            <tr>
                <th> </th>
                <td>
                <pre>{php print_r($result);}</pre>
                </td>
            </tr>
            {/if}
            {/if}
        </table>
        </form>
    </div>
</div>

</body>
</html>